home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / BlueCustom.swf / scripts / frame_630 / PlaceObject2_80_19 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-26  |  21.8 KB  |  757 lines

  1. onClipEvent(enterFrame){
  2.    if(this._xscale > _global.psize - 10)
  3.    {
  4.       this._xscale -= 10;
  5.       this._yscale -= 10;
  6.    }
  7.    if(this._xscale < _global.psize + 10)
  8.    {
  9.       this._xscale += 10;
  10.       this._yscale += 10;
  11.    }
  12.    _root.nightsky._rotation += _global.boost / 4;
  13.    _global.vincy -= 1;
  14.    if(_global.vincy == 60)
  15.    {
  16.       fx11 = new Sound(zoop1);
  17.       fx11.attachSound("DITDAT");
  18.       fx11.start(0,1);
  19.    }
  20.    if(_global.vincy == 20)
  21.    {
  22.       fx11 = new Sound(zoop1);
  23.       fx11.attachSound("DITDAT");
  24.       fx11.start(0,1);
  25.    }
  26.    if(_global.vincy == 0)
  27.    {
  28.       this.gotoAndStop(1);
  29.       _global.psize = 100;
  30.       maxspeed = 14;
  31.    }
  32.    if(_global.timeday == 0)
  33.    {
  34.       skyit++;
  35.    }
  36.    if(skyit == 1000)
  37.    {
  38.       _root.sky.gotoAndPlay("night");
  39.    }
  40.    if(skyit == 5000)
  41.    {
  42.       _root.sky.gotoAndPlay("day");
  43.       skyit = 0;
  44.    }
  45.    _root.sky._y = _root.depth._y + 60 - (_root.depth._y - this._y) / 10;
  46.    _root.backstuff1._y = _root.depth._y;
  47.    _root.backstuff2._y = _root.backstuff1._y;
  48.    _root.topdepth1._y = _root.depth._y;
  49.    _root.topdepth2._y = _root.depth._y;
  50.    _root.topdepth3._y = _root.depth._y;
  51.    if(die == 1)
  52.    {
  53.       timey += 1;
  54.       if(_global.fly == 1)
  55.       {
  56.          if(this._rotation < 90)
  57.          {
  58.             if(this._rotation > 0)
  59.             {
  60.                if(this._currentframe != 3)
  61.                {
  62.                   this.gotoAndStop(3);
  63.                }
  64.             }
  65.          }
  66.          if(this._rotation > 90)
  67.          {
  68.             if(this._rotation < 180)
  69.             {
  70.                if(this._currentframe != 4)
  71.                {
  72.                   this.gotoAndStop(4);
  73.                }
  74.             }
  75.          }
  76.          if(this._rotation < 180)
  77.          {
  78.             if(this._rotation < -90)
  79.             {
  80.                if(this._currentframe != 4)
  81.                {
  82.                   this.gotoAndStop(4);
  83.                }
  84.             }
  85.          }
  86.          flyer++;
  87.          if(flyer == 400)
  88.          {
  89.             fx1 = new Sound(zoop);
  90.             fx1.attachSound("clunk");
  91.             fx1.stop("clunk");
  92.             fx1.start(0,1);
  93.          }
  94.          if(flyer == 450)
  95.          {
  96.             fx1 = new Sound(zoop);
  97.             fx1.attachSound("clunk");
  98.             fx1.stop("clunk");
  99.             fx1.start(0,1);
  100.          }
  101.          if(flyer == 500)
  102.          {
  103.             fx1 = new Sound(zoop);
  104.             fx1.attachSound("clunk");
  105.             fx1.stop("clunk");
  106.             fx1.start(0,1);
  107.          }
  108.          if(flyer > 550)
  109.          {
  110.             fx1 = new Sound(zoop);
  111.             fx1.attachSound("barf");
  112.             fx1.stop("barf");
  113.             fx1.start(0,1);
  114.             _global.fly = 0;
  115.             flyer = 0;
  116.             this.gotoAndStop(1);
  117.             _global.boost = 0;
  118.             _root.tools.bar1.gotoAndStop(1);
  119.             ms = new Sound(music);
  120.             ms.attachSound("music1");
  121.             ms.stop("music6");
  122.             ms.start(0,999);
  123.             i = 1;
  124.             while(i <= 100)
  125.             {
  126.                _root["fishy" + i].die = 0;
  127.                i++;
  128.             }
  129.          }
  130.          if(this._y > _root.topdepth2._y)
  131.          {
  132.             ms = new Sound(music);
  133.             ms.attachSound("music1");
  134.             ms.stop("music6");
  135.             ms.start(0,999);
  136.             fx1 = new Sound(zoop);
  137.             fx1.attachSound("barf");
  138.             fx1.stop("barf");
  139.             fx1.start(0,1);
  140.             _global.fly = 0;
  141.             flyer = 0;
  142.             this.gotoAndStop(1);
  143.             _global.boost = 0;
  144.          }
  145.       }
  146.       else if(_global.fly == 3)
  147.       {
  148.          this.gotoAndStop(1);
  149.          _global.fly = 1;
  150.       }
  151.       _root.topdepth1.swapDepths(10001);
  152.       _root.topdepth2.swapDepths(10002);
  153.       _root.topdepth3.swapDepths(10003);
  154.       _root.tools.instblock._alpha += 3;
  155.       if(_root.tools.score.text < _global.scoreit)
  156.       {
  157.          _root.tools.score.text = _root.tools.score.text + 1;
  158.       }
  159.       if(_root.tools.score.text < _global.scoreit - 10)
  160.       {
  161.          _root.tools.score.text = _root.tools.score.text * 1 + 10;
  162.       }
  163.       _root.topdepth1._x += _global.xgo;
  164.       _root.topdepth2._x += _global.xgo;
  165.       _root.topdepth3._x += _global.xgo;
  166.       if(_root.topdepth3._x > 886.4)
  167.       {
  168.          _root.topdepth3.gotoAndStop(_root.topdepth3._currentframe + 1);
  169.          _root.topdepth3._x = _root.topdepth1._x - 704.2;
  170.       }
  171.       if(_root.topdepth2._x > 886.4)
  172.       {
  173.          _root.topdepth2.gotoAndStop(_root.topdepth2._currentframe + 1);
  174.          _root.topdepth2._x = _root.topdepth3._x - 704.2;
  175.       }
  176.       if(_root.topdepth1._x > 886.4)
  177.       {
  178.          _root.topdepth1.gotoAndStop(_root.topdepth1._currentframe + 1);
  179.          _root.topdepth1._x = _root.topdepth2._x - 704.2;
  180.       }
  181.       if(_root.topdepth3._x < -1035.4)
  182.       {
  183.          _root.topdepth3.gotoAndStop(_root.topdepth3._currentframe - 1);
  184.          _root.topdepth3._x = _root.topdepth2._x + 704.2;
  185.       }
  186.       if(_root.topdepth2._x < -1035.4)
  187.       {
  188.          _root.topdepth2.gotoAndStop(_root.topdepth2._currentframe - 1);
  189.          _root.topdepth2._x = _root.topdepth1._x + 704.2;
  190.       }
  191.       if(_root.topdepth1._x < -1035.4)
  192.       {
  193.          _root.topdepth1.gotoAndStop(_root.topdepth1._currentframe - 1);
  194.          _root.topdepth1._x = _root.topdepth3._x + 704.2;
  195.       }
  196.       if(_global.boost > 1)
  197.       {
  198.          _global.boost -= _global.boost / 1000;
  199.          _root.tools.bar1.gotoAndStop(Math.round(_global.boost + 1));
  200.       }
  201.       countgo--;
  202.       buttoner++;
  203.       _root.player.swapDepths(10000);
  204.       _root.playersize.text = psize;
  205.       if(speed == 0)
  206.       {
  207.          this.tail1.gotoAndStop(1);
  208.       }
  209.       else
  210.       {
  211.          this.tail1.play();
  212.       }
  213.       if(Key.isDown(37))
  214.       {
  215.          this._rotation -= speed / 3 + _global.rotspeed1;
  216.       }
  217.       else
  218.       {
  219.          _global.goleft = 0;
  220.       }
  221.       if(Key.isDown(39))
  222.       {
  223.          this._rotation += speed / 3 + _global.rotspeed1;
  224.       }
  225.       else
  226.       {
  227.          _global.goright = 0;
  228.       }
  229.       countit5++;
  230.       if(Key.isDown(32))
  231.       {
  232.          if(countit5 > 40)
  233.          {
  234.             if(_global.goballs > 0)
  235.             {
  236.                countit5 = 0;
  237.                if(_global.goballs == 1)
  238.                {
  239.                   _root.player.ongoball1.gotoAndPlay(22);
  240.                }
  241.                if(_global.goballs == 2)
  242.                {
  243.                   _root.player.ongoball2.gotoAndPlay(22);
  244.                }
  245.                _global.goballs -= 1;
  246.                if(countgo < 0)
  247.                {
  248.                   countgo = 30;
  249.                   _root.zoom.gotoAndPlay(1);
  250.                   _root.zoom._x = this._x;
  251.                   _root.zoom._y = this._y;
  252.                   _root.zoom._rotation = this._rotation;
  253.                   fx1 = new Sound(zoop);
  254.                   fx1.attachSound("zoop");
  255.                   fx1.stop("zoop");
  256.                   fx1.start(0,1);
  257.                   if(this._y > _root.depth._y - 20)
  258.                   {
  259.                      if(speed < maxspeed * 1 + 1)
  260.                      {
  261.                         speed = 22;
  262.                      }
  263.                      buttoner = 0;
  264.                   }
  265.                }
  266.             }
  267.          }
  268.       }
  269.       if(Key.isDown(38))
  270.       {
  271.          if(_global.fly == 0)
  272.          {
  273.             if(this._y > _root.depth._y)
  274.             {
  275.                if(speed < maxspeed)
  276.                {
  277.                   speed += 1;
  278.                }
  279.             }
  280.          }
  281.          else if(speed < maxspeed)
  282.          {
  283.             speed += 1;
  284.          }
  285.       }
  286.       else if(speed > 0)
  287.       {
  288.          speed -= 1;
  289.       }
  290.       if(speed > 0)
  291.       {
  292.          speed -= 0.3;
  293.       }
  294.       hey = 1;
  295.       if(_global.fly == 0)
  296.       {
  297.          if(this._y < _root.depth._y)
  298.          {
  299.             air += 0.4;
  300.             if(this._rotation > 0)
  301.             {
  302.                if(this._rotation < 90)
  303.                {
  304.                   this._rotation -= 3;
  305.                }
  306.             }
  307.             if(this._rotation < 180)
  308.             {
  309.                if(this._rotation > 90)
  310.                {
  311.                   this._rotation += 3;
  312.                }
  313.             }
  314.          }
  315.          else if(air > 0.5)
  316.          {
  317.             air -= 0.5;
  318.          }
  319.       }
  320.       else
  321.       {
  322.          air = 0;
  323.       }
  324.       if(this._y < _root.depth._y + 15)
  325.       {
  326.          if(this._y > _root.depth._y - 15)
  327.          {
  328.             if(air > 3)
  329.             {
  330.                if(_root.splash._currentframe == 1)
  331.                {
  332.                   _root.splash._x = this._x;
  333.                }
  334.                _root.splash.play();
  335.             }
  336.          }
  337.       }
  338.       if(this._y < _root.depth._y + 15)
  339.       {
  340.          if(this._y > _root.depth._y - 15)
  341.          {
  342.             if(air < 1)
  343.             {
  344.                if(_root.splashup._currentframe == 1)
  345.                {
  346.                   _root.splashup._x = this._x;
  347.                }
  348.                _root.splashup.play();
  349.             }
  350.          }
  351.       }
  352.       _global.xgo = Math.cos(3.141592653589793 * this._rotation / 180) * speed;
  353.       _global.ygo = Math.sin(3.141592653589793 * this._rotation / 180) * speed - air;
  354.       onefish1++;
  355.       if(onefish1 == 50)
  356.       {
  357.          onefish1 = 0;
  358.          _global.fish = _global.fish + 1;
  359.          duplicateMovieClip(_root.food1,"fishy" + _global.fish,16384 + (_global.fish + 8000));
  360.          if(_global.fish > 100)
  361.          {
  362.             _global.fish = 1;
  363.          }
  364.          rotrandy = 90;
  365.          rotrand = Math.round(Math.random() * (rotrandy - (- rotrandy))) - rotrandy;
  366.          speedrand = Math.round(Math.random() * 8) + 3;
  367.          leftright = Math.round(Math.random() * 1) + 1;
  368.          firsttypecomp = 10;
  369.          type = Math.round(Math.random() * (firsttypecomp - 1)) + 1;
  370.          if(type < 5)
  371.          {
  372.             type = 1;
  373.          }
  374.          else
  375.          {
  376.             type -= 4;
  377.          }
  378.          if(leftright == 1)
  379.          {
  380.             xposy = 1500;
  381.          }
  382.          else
  383.          {
  384.             xposy = -800;
  385.          }
  386.          _root["fishy" + _global.fish]._x = xposy;
  387.          _root["fishy" + _global.fish]._y = type * 200;
  388.          _root["fishy" + _global.fish]._rotation -= 90 - rotrand;
  389.          if(type == 1)
  390.          {
  391.             typespeed = speedrand;
  392.             turnspeed = 5;
  393.          }
  394.          if(type == 2)
  395.          {
  396.             typespeed = speedrand;
  397.             turnspeed = 5;
  398.          }
  399.          if(type == 3)
  400.          {
  401.             typespeed = speedrand / 3;
  402.             turnspeed = 0.5;
  403.          }
  404.          if(type == 4)
  405.          {
  406.             typespeed = speedrand / 2;
  407.             turnspeed = 3;
  408.          }
  409.          if(type == 5)
  410.          {
  411.             typespeed = speedrand;
  412.             turnspeed = 3;
  413.          }
  414.          _root["fishy" + _global.fish].turnspeed = turnspeed;
  415.          _root["fishy" + _global.fish].mespeed = typespeed - 1;
  416.          mesizey = 30 + speedrand * 5;
  417.          _root["fishy" + _global.fish].mesize = mesizey;
  418.          _root["fishy" + _global.fish].fishtype = type;
  419.          scoreworthy = mesizey / 2 / (type * 2) * 10;
  420.          _root["fishy" + _global.fish].scoreworth = scoreworthy;
  421.          _root["fishy" + _global.fish].die = 1;
  422.       }
  423.       onefish2++;
  424.       if(onefish2 == 120)
  425.       {
  426.          onefish2 = 0;
  427.          if(_global.fishe < 30)
  428.          {
  429.             _global.fishe = _global.fishe + 1;
  430.             duplicateMovieClip(_root.enemy1,"fishye" + _global.fishe,16384 + (_global.fishe + 8200));
  431.             rotrand = Math.round(Math.random() * 179) + 1;
  432.             speedrand = Math.round(Math.random() * 3) + 7;
  433.             leftright = Math.round(Math.random() * 1) + 1;
  434.             firsttypecomp = 4;
  435.             type = Math.round(Math.random() * (firsttypecomp + 4 - 1)) + 1;
  436.             if(type < 4)
  437.             {
  438.                type = 1;
  439.             }
  440.             if(leftright == 1)
  441.             {
  442.                xposy = 2000;
  443.             }
  444.             else
  445.             {
  446.                xposy = -1300;
  447.             }
  448.             _root["fishye" + _global.fishe]._x = xposy;
  449.             _root["fishye" + _global.fishe]._y = type * 200;
  450.             _root["fishye" + _global.fishe]._rotation = rotrand;
  451.             if(type == 1)
  452.             {
  453.                typespeed = speedrand;
  454.                turnspeed = 7;
  455.             }
  456.             if(type == 2)
  457.             {
  458.                typespeed = speedrand;
  459.                turnspeed = 5;
  460.             }
  461.             if(type == 3)
  462.             {
  463.                typespeed = speedrand / 3;
  464.                turnspeed = 1;
  465.             }
  466.             if(type == 4)
  467.             {
  468.                typespeed = speedrand / 2;
  469.                turnspeed = 3;
  470.             }
  471.             if(type == 5)
  472.             {
  473.                typespeed = speedrand / 4;
  474.                turnspeed = 4;
  475.             }
  476.             _root["fishye" + _global.fishe].turnspeed = turnspeed;
  477.             _root["fishye" + _global.fishe].mespeed = typespeed;
  478.             _root["fishye" + _global.fishe].mesize = 160;
  479.             _root["fishye" + _global.fishe].fishtype = 1;
  480.             _root["fishye" + _global.fishe].die = 1;
  481.          }
  482.       }
  483.    }
  484.    else
  485.    {
  486.       restartcount++;
  487.       if(restartcount > 60)
  488.       {
  489.          if(this._y > _root.depth._y - 400)
  490.          {
  491.             _global.ygo += 1;
  492.          }
  493.          else
  494.          {
  495.             _global.ygo /= 2;
  496.          }
  497.       }
  498.       if(restartcount > 130)
  499.       {
  500.          if(restartcount == 140)
  501.          {
  502.             fx1 = new Sound(zoop);
  503.             fx1.attachSound("Clunk");
  504.             fx1.stop("Clunk");
  505.             fx1.start(0,1);
  506.             _root.finalscore.text = _global.scoreit;
  507.          }
  508.          boostor = 0;
  509.          if(restartcount == 160)
  510.          {
  511.             if(_global.boost > 50)
  512.             {
  513.                fx1 = new Sound(zoop);
  514.                fx1.attachSound("boingboing");
  515.                fx1.stop("boingboing");
  516.                fx1.start(0,1);
  517.                booster = Math.round(_global.boost * 5);
  518.                _root.finalscore.text += "\n\n + Fury Bonus " + booster;
  519.             }
  520.             else
  521.             {
  522.                fx1 = new Sound(zoop);
  523.                fx1.attachSound("Clunk");
  524.                fx1.stop("Clunk");
  525.                fx1.start(0,1);
  526.                _root.finalscore.text += "\n\n ----- ";
  527.             }
  528.          }
  529.          if(restartcount == 180)
  530.          {
  531.             if(timey > 100)
  532.             {
  533.                fx1 = new Sound(zoop);
  534.                fx1.attachSound("boingboing");
  535.                fx1.stop("boingboing");
  536.                fx1.start(0,1);
  537.                _root.finalscore.text += "\n + Time Bonus " + Math.round(timey / 100);
  538.             }
  539.             else
  540.             {
  541.                fx1 = new Sound(zoop);
  542.                fx1.attachSound("Clunk");
  543.                fx1.stop("Clunk");
  544.                fx1.start(0,1);
  545.                _root.finalscore.text += "\n ----- ";
  546.             }
  547.          }
  548.          if(restartcount == 200)
  549.          {
  550.             bonos = 0;
  551.             yito = Math.floor(Math.random() * 20) + 1;
  552.             goyy = 0;
  553.             if(yito == 1)
  554.             {
  555.                bono = "+ random jig bonus ";
  556.                bonos = 400;
  557.                goyy = 1;
  558.             }
  559.             if(yito == 2)
  560.             {
  561.                bono = "+ super random bonus ";
  562.                bonos = 1;
  563.                goyy = 1;
  564.             }
  565.             if(yito == 3)
  566.             {
  567.                bono = "+ suprise bonus ";
  568.                bonos = 200;
  569.                goyy = 1;
  570.             }
  571.             if(yito == 4)
  572.             {
  573.                bono = "+ wooowee bonus ";
  574.                bonos = 99;
  575.                goyy = 1;
  576.             }
  577.             if(yito == 5)
  578.             {
  579.                bono = "+ slugface bonus ";
  580.                bonos = 60;
  581.                goyy = 1;
  582.             }
  583.             if(yito == 6)
  584.             {
  585.                bono = "+ extra bonus ";
  586.                bonos = 20;
  587.                goyy = 1;
  588.             }
  589.             if(yito == 7)
  590.             {
  591.                bono = "+ wow bonus ";
  592.                bonos = 80;
  593.                goyy = 1;
  594.             }
  595.             if(yito == 8)
  596.             {
  597.                bono = "+ slow bonus ";
  598.                bonos = 3;
  599.                goyy = 1;
  600.             }
  601.             if(yito == 9)
  602.             {
  603.                bono = "+ helpy bonus ";
  604.                bonos = 6;
  605.                goyy = 1;
  606.             }
  607.             if(yito == 10)
  608.             {
  609.                bono = "+ mental handicap ";
  610.                bonos = 12;
  611.                goyy = 1;
  612.             }
  613.             if(goyy == 1)
  614.             {
  615.                fx1 = new Sound(zoop);
  616.                fx1.attachSound("boingboing");
  617.                fx1.stop("boingboing");
  618.                fx1.start(0,1);
  619.                _root.finalscore.text += "\n" + bono + bonos;
  620.             }
  621.             else
  622.             {
  623.                fx1 = new Sound(zoop);
  624.                fx1.attachSound("Clunk");
  625.                fx1.stop("Clunk");
  626.                fx1.start(0,1);
  627.                _root.finalscore.text += "\n ----- ";
  628.             }
  629.          }
  630.          if(restartcount == 220)
  631.          {
  632.             scoreyy = _global.scoreit + Math.round(timey / 100) + Math.round(_global.boost * 5) + bonos;
  633.             if(scoreyy < _global.pp3s)
  634.             {
  635.                fx1 = new Sound();
  636.                fx1.attachSound("barf");
  637.                fx1.stop("barf");
  638.                fx1.start(0,1);
  639.                _root.restartbox.resety.gotoAndPlay("barf");
  640.             }
  641.             else
  642.             {
  643.                ms = new Sound(music);
  644.                ms.attachSound("music3");
  645.                ms.stop("music2");
  646.                ms.start(0,999);
  647.                fx1.start(0,1);
  648.                _root.restartbox.resety.gotoAndPlay("goody");
  649.             }
  650.             _root.finalscore.text += "\n\n" + scoreyy;
  651.             if(scoreyy > _global.pp3s)
  652.             {
  653.                _root.slot1.text = "name";
  654.                _root.slot1.selectable = 1;
  655.                Selection.setFocus(_root.slot1);
  656.             }
  657.             _root.highlist.text = "1: " + _global.pp1n + " : " + _global.pp1s + "\n";
  658.             _root.highlist.text += "2: " + _global.pp2n + " : " + _global.pp2s + "\n";
  659.             _root.highlist.text += "3: " + _global.pp3n + " : " + _global.pp3s + "\n";
  660.          }
  661.          if(_root.restartbox._currentframe == 1)
  662.          {
  663.             _root.restartbox.play();
  664.             ms = new Sound(music);
  665.             ms.attachSound("music2");
  666.             ms.stop("music1");
  667.             ms.start(0,999);
  668.          }
  669.          if(scoreyy > _global.pp3s)
  670.          {
  671.             if(Key.isDown(13))
  672.             {
  673.                if(scoreyy > _global.pp3s)
  674.                {
  675.                   if(scoreyy < _global.pp2s + 1)
  676.                   {
  677.                      _global.pp3n = _root.slot1.text;
  678.                      _global.pp3s = scoreyy;
  679.                   }
  680.                }
  681.                if(scoreyy > _global.pp2s)
  682.                {
  683.                   if(scoreyy < _global.pp1s + 1)
  684.                   {
  685.                      _global.pp3n = _global.pp2n;
  686.                      _global.pp3s = _global.pp2s;
  687.                      _global.pp2n = _root.slot1.text;
  688.                      _global.pp2s = scoreyy;
  689.                   }
  690.                }
  691.                if(scoreyy > _global.pp1s)
  692.                {
  693.                   _global.pp3n = _global.pp2n;
  694.                   _global.pp3s = _global.pp2s;
  695.                   _global.pp2n = _global.pp1n;
  696.                   _global.pp2s = _global.pp1s;
  697.                   _global.pp1n = _root.slot1.text;
  698.                   _global.pp1s = scoreyy;
  699.                }
  700.                scoreyy = 0;
  701.                myLocalSO.data.pp1n = _global.pp1n;
  702.                myLocalSO.data.pp1s = _global.pp1s;
  703.                myLocalSO.data.pp2n = _global.pp2n;
  704.                myLocalSO.data.pp2s = _global.pp2s;
  705.                myLocalSO.data.pp3n = _global.pp3n;
  706.                myLocalSO.data.pp3s = _global.pp3s;
  707.                _root.highlist.text = "1: " + _global.pp1n + " - " + _global.pp1s + "\n";
  708.                _root.highlist.text += "2: " + _global.pp2n + " - " + _global.pp2s + "\n";
  709.                _root.highlist.text += "3: " + _global.pp3n + " - " + _global.pp3s + "\n";
  710.                getUrl("FSCommand:save", "file.txt");
  711.                _root.slot1.text = "";
  712.                _root.slot1.selectable = 0;
  713.             }
  714.          }
  715.          if(Key.isDown(38))
  716.          {
  717.             _root.finalscore.text = "";
  718.             _root.highlist.text = "";
  719.             _root.slot1.text = "";
  720.             _root.restartbox.gotoAndPlay("endy");
  721.             die = 1;
  722.             _root.tools.powerup1.gotoAndStop(1);
  723.             _global.boost = 0;
  724.             _root.tools.bar1.gotoAndStop(1);
  725.             ms = new Sound(music);
  726.             ms.attachSound("music1");
  727.             ms.stop("music2");
  728.             ms.stop("music3");
  729.             ms.start(0,999);
  730.             musicy = 2;
  731.             _global.goballs = 0;
  732.             _root.player.ongoball1._alpha = 0;
  733.             _root.player.ongoball2._alpha = 0;
  734.             this.gotoAndStop(1);
  735.             restartcount = 0;
  736.             _root.tools.score.text = 0;
  737.             _global.scoreit = 0;
  738.             timey = 0;
  739.             _global.fish = 0;
  740.             _global.fishe = 0;
  741.             i = 1;
  742.             while(i <= 30)
  743.             {
  744.                _root["fishye" + i].die = 0;
  745.                i++;
  746.             }
  747.             i = 1;
  748.             while(i <= 100)
  749.             {
  750.                _root["fishy" + i].die = 0;
  751.                i++;
  752.             }
  753.          }
  754.       }
  755.    }
  756. }
  757.